package com.ubxtech.web.handler.auth.impl;

import com.ubxtech.web.handler.auth.AuthCollectService;
import com.ubxtech.web.handler.auth.LoginAuthService;
import lombok.extern.slf4j.Slf4j;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

/**
 * @author Victor.Xiao
 * @since 2022-01-17 11:33
 **/
@Slf4j
public class SignAuthServiceImpl implements LoginAuthService {

    private AuthCollectService authCollectService;

    public SignAuthServiceImpl(AuthCollectService authCollectService){
        this.authCollectService = authCollectService;
    }

    /**
     * 鉴权
     * @author Victor.Xiao
     * @since 2022-01-17 11:36
     * @param request request
     * @param response response
     * @param handler handler
     * @return boolean
     */
    @Override
    public boolean auth(HttpServletRequest request, HttpServletResponse response, Object handler){
        return authCollectService.signAuth(request, response, handler);
    }



}
